﻿@model DiffPlex.DiffBuilder.Model.SideBySideDiffModel

@{
    ViewBag.Title = "ShowDiff";
}

<h2>ShowDiff</h2>
<div id="diffBox">
    <div id="leftPane">
        <div class="diffHeader">Old Text</div>
        @{Html.RenderPartial("DiffPane", Model.OldText);}
    </div>
    <div id="rightPane">
        <div class="diffHeader">New Text</div>
        @{Html.RenderPartial("DiffPane", Model.NewText);}
    </div>
    <div class="clear"></div>
</div>

<input type="button" id="btnClose" name="btnClose" value="Close" onclick="CloseWithWindowOpenTrick();" />

@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/jqueryui")
@Scripts.Render("~/bundles/diff")
@section Scripts {
<script type="text/javascript">
    function CloseWithWindowOpenTrick() {
        var objWindow = window.open(location.href, "_self");
        objWindow.close();
    }
  </script>
<script type="text/javascript" >
    $(document).ready(function () {
        InitializeDiffPanes();
    });
  </script>
}